<!DOCTYPE html>
<html>
<head>
    <title>患者档案</title>
    <#include "/header.html">
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <div class="grid-btn">

            <#if shiro.hasPermission("patient:files:update")>
                <a class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;查看</a>
            </#if>
            <#if shiro.hasPermission("patient:files:delete")>
                <a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
            </#if>
        </div>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <div v-show="!showList" class="panel panel-default">
        <div class="panel-heading">{{title}}</div>
        <form class="form-horizontal">
            <div class="form-group" >
                <input type="hidden" id="appointmentId" name="appointmentId" v-model="files.id">
                <input type="hidden" id="patientId"  name="patientId" v-model="files.userId" >
                <div class="col-sm-2 control-label">患者姓名:</div>
                <div class="col-sm-2">
                    <input type="text" class="form-control" id="name" name="name" v-model="user.name" placeholder="患者姓名"/>
                </div>
                <div class="col-sm-2 control-label" ><span>联系方式:</span></div>
                <div class="col-sm-2">
                    <input type="text" class="form-control" id="phone" name="phone" v-model="user.phone" placeholder="联系方式"/>
                </div>
                <div class="col-sm-4"></div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">年龄:</div>
                <div class="col-sm-2">
                    <input type="text" class="form-control" id="age" name="age" v-model="user.age" placeholder="年龄"/>
                </div>
                <div class="col-sm-2 control-label">身份证号:</div>
                <div class="col-sm-2">
                    <input type="text" class="form-control" id="card" name="card" v-model="user.card" placeholder="身份证号"/>
                </div>
            </div>
            <div class="form-group" >
                <input type="hidden" id="appointmentId" name="appointmentId" v-model="files.id">
                <input type="hidden" id="patientId"  name="patientId" v-model="files.id" >
                <div class="col-sm-2 control-label">医保卡号:</div>
                <div class="col-sm-2">
                    <input type="text" class="form-control" id="carteVital" name="carteVital" v-model="files.carteVital" placeholder="医保卡号"/>
                </div>
                <div class="col-sm-2 control-label" ><span>就诊次数:</span></div>
                <div class="col-sm-2">
                    <input type="text" class="form-control" id="numberVisit" name="numberVisit" v-model="files.numberVisit" placeholder="就诊次数"/>
                </div>
                <div class="col-sm-4"></div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">地址:</div>
                <div class="col-sm-2">
                    <input type="text" class="form-control" id="address" name="address" v-model="files.address" placeholder="地址"/>
                </div>
                <div class="col-sm-2 control-label">性别:</div>
                <div class="col-sm-2">
                    <input type="text" class="form-control" id="gender" name="gender" v-model="user.gender" placeholder="性别"/>
                </div>
            </div>
            <div class="form-group">
                    <table>
                        <tr>
                            <th>时间</th>
                            <th>名称</th>
                        </tr>
                        <tr v-for="p in diagnostic">
                            <div class="col-sm-1">
                                <td>{{p.uploadTime}}</td>
                            </div>
                            <div class="col-sm-3">
                                <td>{{p.reportName}}</td>
                            </div>


                        </tr>
                    </table>
            </div>

            <div class="form-group">
                <div class="col-sm-2 control-label"></div>
                <input type="button" class="btn btn-primary" id="btnSaveOrUpdate" data-loading-text="保存中..."
                       @click="saveOrUpdate" value="确定"/>
                &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
            </div>
        </form>
    </div>
</div>

<script src="${request.contextPath}/statics/js/modules/patient/files.js?_${.now?long}"></script>
</body>
</html>